package com.sushi.controller;

import com.sushi.service.ActivityApplyService;
import com.sushi.response.ResponseBO;
import com.sushi.response.ResponsePageBO;
import com.sushi.response.ActivityApplyResp;
import com.sushi.request.ActivityApplyReq;
import com.sushi.request.ActivityApplyPageReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.*;

/**
 * 活动报名 控制器
 * @date 2023-05-02
 * @time 17:09:50
 * @author Administrator
 */
@RestController
@Slf4j
public class ActivityApplyController {

	@Autowired
	private ActivityApplyService activityApplyService;

    

    /**
     * 新增
     */
    @PostMapping("/activityApply/add")
    public ResponseBO<ActivityApplyResp> add(@RequestBody ActivityApplyReq req) {
        return activityApplyService.add(req);
    }

    /**
     * 逻辑删除
     */
    @PostMapping("/activityApply/remove")
    public ResponseBO<ActivityApplyResp> remove(@RequestBody ActivityApplyReq req) {
        return activityApplyService.logicRemove(req);
    }

    /**
     * 更新
     */
    @PostMapping("/activityApply/update")
    public ResponseBO<ActivityApplyResp> update(@RequestBody ActivityApplyReq req) {
        return activityApplyService.updateByField(req);
    }

    /**
     * 列表
     */
    @PostMapping("/activityApply/list")
    public ResponsePageBO<ActivityApplyResp> list(@RequestBody ActivityApplyPageReq req) {
        return activityApplyService.listByCondition(req);
    }

    /**
     * 详情
     */
    @PostMapping("/activityApply/detail")
    public ResponseBO<ActivityApplyResp> detail(@RequestBody ActivityApplyReq req) {
        return activityApplyService.detail(req);
    };

}